package com.leyou.auth.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 虎哥
 */
@Configuration
public class OssConfig {

    @Bean
    public OSS ossClient(OssProperties prop){
        return new OSSClientBuilder().build(
                prop.getEndpoint(), prop.getAccessKeyId(), prop.getAccessKeySecret());
    }
}
